<template>
      <div class="form-group" style="padding-right:30px;" v-if="goodsData != undefined">
            <div class="row">
                  <div class="col-xs-12">
                      <span>商品条件</span>  
                  </div>
            </div>
            <div class="row">
                  <div class="col-xs-12">
                      <label style="font-weight:normal"><input type="radio" v-model="returnGoodsType" value="stratum" name="goodsA">商品階層</label>
                      <label style="font-weight:normal;margin-left:10px;"><input type="radio" v-model="returnGoodsType" value="jan" name="goodsA">単品</label> 
                  </div>
                  <janComponent v-show="janShow" />
                  <prodComponent :prodObj="goodsData.prod" :company="companyValue" :goodsMast="goodsMast" :prodInputNum="3" :isfav="$attrs.isfav" :prodChooseNum="3" :style="{'display':showOrHideGoods('stratum')}"></prodComponent>
            </div>
            <div style="border-bottom:1px solid #dddddd;margin-top:10px;"></div>
      </div>
</template>

<script>
import janComponent from '@/components/jan.vue';
import prodComponent from '@/components/prod.vue';
export default {
      name:'menuprodComponent',
      components:{
            janComponent,
            prodComponent
      },
      data:function(){
            return {
                  prodShow: false,
                  prodGrpShow: false,
                  janShow: true
            };
      },
      props:{
      },
      watch:{
      },
      computed:{
            returnGoodsType:{
                  get(){
                        return 'kaisou';
                  },
                  set(val){
                        if(val === 'kaisou') {
                              this.prodShow = true
                              this.prodGrpShow = false
                              this.janShow = false
                        }else if(val === 'group') {
                              this.prodShow = false
                              this.prodGrpShow = true
                              this.janShow = false
                        }else {
                              this.prodShow = false
                              this.prodGrpShow = false
                              this.janShow = true
                        }
                  }
            }
      }
};
</script>